package com.briup.bms.common.utils;

import org.springframework.beans.BeanUtils;

public class EntityUtils {
	public static <T> T toEntity(Object source,Class<T> c) {
		T target = null;
		try {
			target = c.newInstance();
			BeanUtils.copyProperties(source, target);
			return target;
		} catch (Exception e) {
			return null;
		}
	}
}
